package com.ynny.Controller;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import com.ynny.Monitor.MonitorBlockHandler;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Ultraman")
public class ServerSentinel {
    @GetMapping( "/dijia")//迪迦
   @SentinelResource(value = "helloResource",fallback = "helloBlockHandler",blockHandlerClass = MonitorBlockHandler.class)
    public  String  hello(){
    return "@_@!";
    }
    @SentinelResource(value = "sailuoResource",blockHandler = "helloBlockHandler",blockHandlerClass = MonitorBlockHandler.class)
    @GetMapping("/sailuo")
    public  String sailou(){
        return "赛罗奥特曼";
    }
}
